﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _26方法的递归
{
    class Program
    {
        static void Main(string[] args)
        {
            Str();
            Console.ReadKey();
        }
        //方法的递归
        public static int i = 0;
        public static void Str()
        {
            Console.WriteLine("从");
            Console.WriteLine("从前");
            Console.WriteLine("从前有");
            Console.WriteLine("从前有座");
            Console.WriteLine("从前有座山");
            i++;
            if (i >= 10)
            {
                return;
            }
            Str();
        }

    }
}
